<template>
  <m-page>
    <!-- 还款结果 -->
    <m-header title="还款结果"></m-header>
    <div class="repayment_result">
      <div class="u-img">
        <div class="u-nullBox"></div>
        <p>还款详情</p>
      </div>

      <!-- 当可提现金额小于应还金额，需要从储蓄卡转账。此时显示以下页面 -->
      <div class="g-view1" v-if="(data.repayMoney-0) > (data.withdraw-0)">
        <div class="u-null"></div>
        <div class="g-list1">
          <ynet-icon name="checked success"></ynet-icon>
          <span>还款成功</span>
        </div>
        <div class="g-list2">
          <p>还款金额：4000元</p>
          <p>到期日：2019/10/10</p>
        </div>
        <div class="g-list2">
          <p>还款金额：1000元</p>
          <p>到期日：2019/10/10</p>
        </div>
        <div class="u-null1"></div>
        <div class="g-list2">
          <p>转账卡号</p>
          <p>124141****4521</p>
        </div>
        <div class="g-list2">
          <p>转账金额</p>
          <p>8000元</p>
        </div>
        <div class="g-list2">
          <p>还款总金额</p>
          <p>1400.00元</p>
        </div>
        <div class="g-list2">
          <p>交易时间</p>
          <p>2019-01-10</p>
        </div>
      </div>

      <!-- 当可提现金额大于等于应还金额，不需要从储蓄卡转账。此时显示以下页面 -->
      <div class="g-view2" v-if="(data.repayMoney-0) <= (data.withdraw-0)">
        <div class="u-top">
          <div class="g-list2">
            <p>还款总金额</p>
            <p>1400.00元</p>
          </div>
          <div class="g-list2">
            <p>交易时间</p>
            <p>2019-01-10</p>
          </div>
        </div>
      </div>
      <!-- 页面底部 -->
      <div class="u-btn">
        <ynet-button type="warning" @click="handclick">完成</ynet-button>
      </div>
      <p class="g-list3">猜你需要</p>
      <div class="g-list4">
        <div class="g-left">
          <ynet-icon name="clock"></ynet-icon>
          <p @click="gotoAutoSet">自动还款设置</p>
        </div>
        <div class="g-right">
          <ynet-icon name="id-card"></ynet-icon>
          <p @click="gotoMyBill">查看账单</p>
        </div>
      </div>
    </div>
  </m-page>
</template>

<script>
import ynetButton from "@components/button/index";
import ynetIcon from "@components/icon/index";
export default {
  components: {
    ynetIcon,
    ynetButton
  },
  data() {
    return {
      data: {}
    };
  },
  created() {
    this.data = app.params;
  },
  methods: {
    //页面跳转
    goto(item, data) {
      let url = `http://172.16.1.197:8080/smallbusinessloan/xin_yi_tong_card/${item}`;
      // let url = `smallbusinessloan/rong_yi_tong_card/${item}`;
      // app.api.pushWindow(url, params);
    },
    // 完成按钮
    // 点击返回融易通卡主页
    handclick() {
      this.goto("home_card_information.html");
    },
    // 自动还款设置
    gotoAutoSet() {
      this.goto("autopay_select.html");
    },
    // 查看我的账单
    gotoMyBill() {
      this.goto("bill_my_bill.html");
    }
  },
  mounted() {},
  watch: {},
  computed: {}
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
</style>

